package com.demo.personalaccountingbackend.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 分类数据传输对象
 *
 * @author zgx
 * @version 1.0
 * @date 2025/10/28 11:39
 */
@Data
@Schema(description = "分类数据传输对象")
public class CategoryDTO {

    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "分类名称")
    private String name;

    @Schema(description = "分类类型：0=支出，1=收入")
    private Integer type;

    @Schema(description = "父级分类ID，0表示顶级分类")
    private Long parentId;

    @Schema(description = "图标标识")
    private String icon;

    @Schema(description = "颜色代码")
    private String color;

    @Schema(description = "排序权重")
    private Integer sort;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "子分类列表")
    private List<CategoryDTO> children;

    @Schema(description = "状态位，0正常，1弃用")
    private Integer status;
}
